Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a config option to disallow the cache clean command #6610

Merged
merged 3 commits into from
Dec 28, 2024

Conversation

elbywan
Copy link
Contributor

@elbywan elbywan commented Nov 21, 2024

What's the problem this PR addresses?

At Datadog we are using yarn inside a huge monorepository using the PnP linker and Zero-Installs with all the dependencies versioned through git.

The issue we have is that people frequently have the tendency to think that this kind of environment works like others, and that cleaning the cache is the way to go whenever they encounter an install issue (like deleting node_modules).

This is obviously not the case and we have to tell them to restore their packages from the git remote when that happens, which is a bit cumbersome.

see also: #6518

How did you fix it?

This PR adds a non-breaking option inside the .yarnrc file to disallow running yarn clean cache.

cc @arcanis

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@elbywan elbywan force-pushed the enable-cache-clean-option branch from 4899d10 to 7dfd619 Compare November 21, 2024 22:17
@elbywan elbywan changed the title add an config to disallow the cache clean command add a config option to disallow the cache clean command Nov 22, 2024
@elbywan elbywan force-pushed the enable-cache-clean-option branch from 7dfd619 to 3788900 Compare November 22, 2024 14:02
@elbywan elbywan force-pushed the enable-cache-clean-option branch from 3788900 to 88a9152 Compare November 22, 2024 14:06
@arcanis arcanis merged commit f0f0c68 into yarnpkg:master Dec 28, 2024
26 checks passed
@elbywan elbywan deleted the enable-cache-clean-option branch December 28, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants